import request from '@/utils/request'

// 获取用餐数据统计
export function getMealStatistics(params) {
  return request({
    url: `/v1/eat/apply/statistics`,
    method: 'GET',
    params
  })
}

// 获取一周的用餐数据
export function getMealDataOfWeek() {
  return request({
    url: `/v1/eat/apply/week/data`,
    method: 'GET'
  })
}

// 获取用餐列表
export function getMealList(params) {
  return request({
    url: `/v1/eat/apply/list`,
    method: 'GET',
    params
  })
}

// 获取报餐截止时间
export function getMealSubscriptCutOffTime(params) {
  return request({
    url: `/v1/eat/apply/time`,
    method: 'GET',
    params
  })
}

// 设置报餐截止时间
export function setMealSubscriptCutOffTime(data) {
  return request({
    url: `/v1/eat/apply/time`,
    method: 'POST',
    data
  })
}

// 获取报餐人
export function getExamineUser() {
  return request({
    url: `/v1/eat/apply/reviewer`,
    method: 'GET'
  })
}

// 设置报餐人
export function setExamineUser(data) {
  return request({
    url: `/v1/eat/apply/reviewer`,
    method: 'POST',
    data
  })
}
